#
#  Be sure to run `pod spec lint YRMob.podspec' to ensure this is a
#  valid spec and to remove all comments including this before submitting the spec.
#
#  To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html
#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |spec|

  spec.name         = 'YRMob'
  spec.version      = '1.3.2'
  spec.summary      = 'YRMob is a SDK from YouRong providing AD service.'
  spec.description      = <<-DESC
  YRMob provides ADs which include native、banner、splash、RewardVideo、Interstitial etc.
                       DESC

  spec.homepage     = 'https://gitee.com/yleaves/yrmob-sdk-ios-pod.git'
  spec.license      = { :type => 'MIT' }
  spec.author       = { 'Fang Ting' => 'fangting@juancloud.com' }
  spec.platform     = :ios, '11.0'
  spec.ios.deployment_target = '11.0'
  spec.source       = { git: 'https://gitee.com/yleaves/yrmob-sdk-ios-pod.git', tag: spec.version.to_s }

  spec.xcconfig     = {'OTHER_LDFLAGS' => '-ObjC',}
  spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
  spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
  spec.requires_arc = true
  spec.static_framework = true
  spec.default_subspec = 'JAGatherAdSDK'

  # 默认的核心模块
  spec.subspec 'JAGatherAdSDK' do |ss|

    ss.ios.library = 'resolv'
    ss.frameworks = 'Security', 
		    'CoreLocation',
		    'CoreTelephony',
		    'SystemConfiguration',
		    'AppTrackingTransparency',
		    'AdSupport',
		    'WebKit',
		    'AVFoundation'

    ss.vendored_frameworks = 'YRMob/JAGatherAdSDK/*.xcframework'
    ss.resources = "YRMob/JAGatherAdSDK/*.bundle"
    ss.dependency 'QiMingADXSDK','2.2.5.0'

  end

  # 百度
  spec.subspec 'JAGBdAdapter' do |ss|

    ss.vendored_frameworks = 'YRMob/JAGBdAdapter/*.xcframework'
    ss.dependency 'BaiduMobAdSDK','5.371'
    ss.dependency 'YRMob/JAGatherAdSDK'

  end

  # 穿山甲融合
  spec.subspec 'JAGCsjFusionAdapter' do |ss|

    ss.vendored_frameworks = 'YRMob/JAGCsjFusionAdapter/*.xcframework'
    ss.dependency 'Ads-CN-Beta/BUAdSDK', '6.4.1.0'
    ss.dependency 'Ads-CN-Beta/CSJMediation', '6.4.1.0'
    ss.dependency 'YRMob/JAGatherAdSDK'

  end

  # 优量汇
  spec.subspec 'JAGGdtAdapter' do |ss|

    ss.vendored_frameworks = 'YRMob/JAGGdtAdapter/*.xcframework'

   ss.dependency 'GDTMobSDK','4.15.00'

    # ss.vendored_libraries = 'YRMob/JAGGdtAdapter/lib/*.a'
    # ss.source_files = 'YRMob/JAGGdtAdapter/lib/*.h'
    # ss.frameworks = "StoreKit","Security","CoreTelephony","AdSupport","CoreLocation","QuartzCore","SystemConfiguration","AVFoundation","JavaScriptCore"
    # ss.weak_framework = 'WebKit'
    # ss.libraries = 'z', 'xml2','sqlite3',"c++","c++abi"

    ss.dependency 'YRMob/JAGatherAdSDK'

  end

  # 快手
  spec.subspec 'JAGKsAdapter' do |ss|

    ss.vendored_frameworks = 'YRMob/JAGKsAdapter/*.xcframework'
    ss.dependency 'KSAdSDK','3.3.69'
    ss.dependency 'YRMob/JAGatherAdSDK'

  end

end